import {
  http
} from './http';

// 登录接口
function commonOauth(params) {
  http('/common/oauth/', 'post', params, 'application/x-www-form-urlencoded')
}

// 用户基本信息接口
function commonOauthBaseinfo(params) {
  http('/common/user/baseinfo', 'get', params)
}

// 注册接口
function userRegister(params) {
  http('/common/user/register?serviceid=wxff3fc00494f4f0e3&registerType=2', 'post', params, 'application/x-www-form-urlencoded')
}

// 绑定手机号
function bindMobile(params) {
  http('/common/user/bind/mobile', 'post', params)
}

// o2o/product/searchV2
function productVaccineProductV2List(params) {
  http('/serve/product/o2o/product/VaccineProductV2List', 'get', params, 'application/x-www-form-urlencoded')
}

// o2o/product/getMiniAppFullScreenAdvV2
function getMiniAppFullScreenAdvV2(params) {
  http('/serve/product/product/activity/getMiniAppFullScreenAdvV2', 'get', params)
}

// 首页获取banner
function miniAppBanners(params) {
  http('/serve/product/product/activity/miniAppBanners', 'get', params)
}

function productVaccinationDetail(params) {
  http('/serve/product/o2o/product/vaccinationDetail', 'get', params)
}

function productVaccinationDetail2(params) {
  http('/serve/product/o2o/product/vaccinationDetail2', 'get', params)
}

function vaccineCategoryList(params) {
  http('/serve/product/vaccine/category/list', 'get', params)
}

function userCommentList(params) {
  http('/common/user/userComment/list2', 'get', params)
}

function areaProvinces(params) {
  http('/common/system/chinese/area/provinces', 'get', params)
}

function areaCities(params) {
  http('/common/system/chinese/area/cities', 'get', params)
}

// 创建订单
function orderSubmit(params) {
  http('/serve/order/ec/submit', 'post', params)
}

// 微信支付
function payAppWeChatPay(params) {
  http('/common/pay/wechatMiniAppPay', 'post', params)
}

// 获取首页订单数量
function getVaccineOrderStatusCount(params) {
  http('/app/vaccine/vaccine/order/getVaccineOrderStatusCount', 'get', params)
}

// 检查是否绑定手机号
function bindCheckBindMobile(params) {
  http('/common/user/bind/checkBindMobile', 'get', params)
}

function orderFrontVaccineOrderListV3(params) {
  http('/app/vaccine/vaccine/order/frontVaccineOrderListV3', 'get', params)
}

function getOrderStatusCount(params) {
  http('/serve/order/ec/getOrderStatusCount', 'get', params)
}

function orderMyOrdersV2(params) {
  http('/serve/order/ec/myOrdersV2', 'get', params)
}

function orderDetailV2(params) {
  http('/serve/order/ec/detailV2', 'get', params)
}

function frontVaccineOrderDetailV3(params) {
  http('/app/vaccine/vaccine/order/frontVaccineOrderDetailV3', 'get', params)
}

// 图片上传
function uploadImage(params) {
  http('/common/review/file/uploadImage', 'get', params)
}

// 体检报告列表接口
function healthReportList(params) {
  http('/app/vaccine/healthReport/list', 'get', params)
}

// 生成小程序二维码接口
function getwxacode(params) {
  http('/common/wechat/wechat/api/getwxacode', 'get', params)
}

// 根据区域id查询区域名称
function areaInfo(params) {
  http('/common/system/chinese/area/areaInfo', 'get', params)
}

// 获取疫苗登记可选城市
function searchArea(params) {
  http('/app/vaccine/vaccine/order/searchArea', 'get', params)
}

// 登记信息查询
function orderDetail(params) {
  http('/app/vaccine/vaccine/order/detail', 'get', params)
}

// 登记信息登记
function orderBook(params) {
  http('/app/vaccine/vaccine/order/book', 'post', params, 'application/json')
}

// 用户拒绝手机号接口
function wxRejectMobile(params) {
  http('/common/user/userDepthInfo/wxRejectMobile', 'post', params)
}

// 订阅
function subscribe(params) {
  http('/serve/product/subscribe/message/subscribe', 'post', params)
}

// 查看是否订阅
function hasSubscribe(params) {
  http('/serve/product/subscribe/message/hasSubscribe', 'get', params)
}

// 创建评价
function userCommentCreate(params) {
  http('/common/user/userComment/create', 'post', params)
}

// 我的评价
function userCommentMyList(params) {
  http('/common/user/userComment/myList', 'get', params)
}

// 热门和历史查询
function searchHotAndHistory(params) {
  http('/serve/product/o2o/product/getKeyword', 'get', params)
}

// 删除历史查询
function deleteHistory(params) {
  http('/serve/product/o2o/product/deleteHistorySearch', 'post', params)
}

// 搜索
function searchResult(params) {
  http('/serve/product/o2o/product/esSearch', 'get', params)
}

// 热评
function userComment(params) {
  http('/common/user/userComment/list', 'get', params)
}

// 根据经纬度查询城市
function getAreaByNameV2(params) {
  http('/common/system/chinese/area/getByNameV2', 'get', params)
}

// 获取商品列表 v3
function vaccineProductV3List(params) {
  http('/serve/product/o2o/product/VaccineProductV3List', 'get', params)
}

// 获取隐私协议
function showPrivacy(params) {
  http('/common/user/showPrivacy', 'get', params)
}

// 阅读隐私协议
function readPrivacy(params) {
  http('/common/user/readPrivacy', 'post', params)
}

// 隐私协议链接
function getProtocolUrl(params) {
  http('/common/user/getProtocolUrl ', 'get', params)
}


// 暴露接口
export default {
  commonOauth,
  productVaccineProductV2List,
  productVaccinationDetail,
  vaccineCategoryList,
  userCommentList,
  areaProvinces,
  areaCities,
  userRegister,
  bindMobile,
  orderSubmit,
  payAppWeChatPay,
  getVaccineOrderStatusCount,
  commonOauthBaseinfo,
  bindCheckBindMobile,
  orderFrontVaccineOrderListV3,
  getOrderStatusCount,
  orderMyOrdersV2,
  frontVaccineOrderDetailV3,
  uploadImage,
  productVaccinationDetail2,
  orderDetailV2,
  healthReportList,
  getwxacode,
  areaInfo,
  searchArea,
  orderDetail,
  wxRejectMobile,
  orderBook,
  subscribe,
  hasSubscribe,
  userCommentCreate,
  userCommentMyList,
  searchHotAndHistory,
  deleteHistory,
  searchResult,
  userComment,
  getAreaByNameV2,
  miniAppBanners,
  getMiniAppFullScreenAdvV2,
  vaccineProductV3List,
  showPrivacy,
  readPrivacy,
  getProtocolUrl
}